extends layout

block content
  include includes/navbar.pug
  h1(style="color: whitesmoke") 图片分享
  .row.mt-3
    .col-12.col-md-8
      if username
        .card
          .card-body(style="background: rgb(112, 193, 179);")
            form(action="/images/", method="post" enctype="multipart/form-data")
              .form-group.row
                label.col-12.col-md-2 浏览
                input.col-12.col-md-10.from-control-file(type='file', name='imgfile')
              .form-group.row
                label.col-12.col-md-2 标题
                input.col-12.col-md-10.from-control(type='text', name='title')
              .form-group.row
                label.col-12.col-md-2 描述
                input.col-12.col-md-10.from-control(type='text', name='description')
              .form-group.row
                .col-12.offset-md-8.col-md-4
                  button.btn.btn-success#login-btn(type='submit')
                    i.fa.fa-cloud-upload 上传图片
        .row.mb-3.mt-3
          each image in images
            a.col-6.col-md-4(href=`/images/${image._id}`)
                .card
                  img.card-img-top(src=`/uploads/${image.diskfilename}`, alt=image.title)
                  .card-body
                    h5.card-title= image.title
                    p.card-text= image.description
                    p.card-text= image.username

    .col-12.col-md-4
      include includes/stats.pug
      include includes/commentlast.pug

  .row
  footer
    .col-12.offset-md-4.col-md-4
      span 图片展示与上传 &copy 闫旭 2018 版权所有

    
              
        
        

